{template '_header'}
<div class="page-heading"> <h2>兑换设置</h2> </div>

<form id="setform" action="{php echo webUrl('exchange/setting');}" method="post" class="form-horizontal form-validate" novalidate="novalidate">

    <div class="form-group">
        <label class="col-sm-2 control-label">入口链接</label>
        <div class="col-sm-9">
            <label class="radio-inline">
                <a href="javascript:;" class="js-clip" title="点击复制链接" data-url="{php echo mobileUrl('exchange','',true);}">{php echo mobileUrl('exchange','',true);}</a>
                </label>
        </div>
    </div>

    <div id="keyword" {if $res['reply']!=1}style="display: none;"{/if}>
    <hr style="margin-top: 6px;margin-bottom: 15px;width: 96%">
<div style="width: 50%;margin-left: 5%;float: left;">
    <div class="form-group">
        <label class="col-sm-3 control-label">触发关键字</label>
        <div class="col-sm-9">
            <input type="text" name="keyword" id="" class="form-control" style="width: 250px;" value="{$res['keyword']}">
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-3 control-label">消息标题</label>
        <div class="col-sm-9">
            <input type="text" name="title" id="" class="form-control" style="width: 250px;" value="{$res['title']}">
        </div>
    </div>

    <div class="form-group">
    <label class="col-sm-3 control-label">消息图片</label>
    <div class="col-sm-9"  style="width: 300px">
        {php echo tpl_form_field_image(img,$res['img']);}
    </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label">消息内容</label>
        <div class="col-sm-9"  style="width: 300px">
            <textarea name="description" id="" cols="30" rows="10" style="height: 6rem" class="form-control">{$res['description']}</textarea>
        </div>
    </div>
</div>
    <br>
    <div style="width: 40%;float: left;">
    </div>
    </div>
    <hr style="margin-top: 16px;margin-bottom: 15px;width: 100%">

    <script type="text/javascript">
        $(document).ready(function () {
            $('#on').click(function () {
                $('#keyword').show();
            });
        });
        $(document).ready(function () {
            $('#off').click(function () {
                $('#keyword').hide();
            });
        });
    </script>


    <br>
    <div class="form-group">
        <label class="col-sm-2 control-label">banner设置</label>
        <div class="col-sm-9 col-xs-12">
            {php echo tpl_form_field_multi_image('img', $images);}
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-9">
            <input type="submit" value="保存" class="btn btn-primary">
        </div>
    </div>
</form>
{template '_footer'}